package cn.sofwin.day0108;

import java.util.Scanner;

public class Test04 {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        int up=0;
        int down= 0;

        for(int i=1; i<=10; i++ ){
            System.out.print("请输入第"+ i +"位顾客的年龄");
            int age = sc.nextInt();
            if(age>= 30){
                up++;
            }else{
                down++;
            }
        }
        double sum = up+down;

        System.out.println("30岁以下的比例是" + (up/sum *100)+"%");
        System.out.println("30岁以下的比例是" + (down/sum*100) +"%");



    }

}
